package site.suimu.service.impl;

import org.springframework.stereotype.Service;
import site.suimu.mapper.TCommentMapper;
import site.suimu.pojo.TComment;
import site.suimu.service.TCommentService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TCommentServiceImpl implements TCommentService {

    @Resource
    TCommentMapper tCommentMapper;

    public boolean ins(TComment tComment) {
        if (tCommentMapper.create(tComment)>0){
            return true;
        }
        return false;
    }

    public boolean dle(int id) {
        if (tCommentMapper.delete(id)>0){
            return true;
        }
        return false;
    }

    public List<TComment> sleByUid(int uid) {
        return tCommentMapper.selectByUid(uid);
    }
}
